﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebPages.AdminPages
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
        {
            string account = Login1.UserName;
            string pwd = Login1.Password;
            if(account == "admin" && pwd == "123456")
            {
                Session.Add("User", account);
                e.Authenticated = true;
                Response.Write("<script>alert('登录成功')</script>");
                Response.Redirect("Main.aspx");
            }
        }
    }
}